<div class="mt20 clearfix ng-scope ml25">
	<span class="fl lh30 f14">线下活动付款信息</span>

	<div class="fr btn-group" ng-if="contractBaseInfo.busnisseType == 7">
		<div class="fr">
			<button type="button" class="btn btn-yellow" ng-click="newPayinfo()">新增付款</button>
			<div id="importSupplierPayment" class="fileinput-button btn btn-yellow" ng-click="importSupplierPayment()">
				<span class="f13">导入付款</span>
				<input type="file" name="file" accept=".xls*">
			</div>
			<a class="btn" href="/api/index.php?r=/contract/export-supplier-payment-model" >导出模板</a>
		</div>
	</div>
</div>
<div id="grid" class="table-wrap mt10 ml25" style="min-height: 200px;overflow: visible">

	<table width="100%" class="valign-t">
		<thead>
		<tr>
			<th width="35">序号</th>
			<th width="35">报名人</th>
			<th width="100">公司</th>
			<th width="35">是否认证</th>
			<th width="35">是否金牌</th>
			<th width="35">支付金额</th>
			<th width="50">扣减权益</th>
			<th width="70">权益订单号</th>
			<th width="35">支付方式</th>
			<th width="70">报名时间</th>
			<th width="100">发票代码</th>
			<th width="50">操作</th>
		</tr>
		</thead>
		<tbody>
		<tr ng-repeat="record in receivedInfo" ng-if="record.__isdelete != 1">
			<td height="40"><p ng-bind="$index + 1"></p></td>
			<td>
				<p ng-if="(record.editMode || 0) == 0" ng-bind="record.username"></p>

				<input type="text" name="username" required class="form-control align-r"
					   ng-if="(record.editMode || 0) != 0"
					   ng-model="record.username" min="0"
					   placeholder="用户名">
			</td>
			<td>
				<p ng-if="(record.editMode || 0) == 0" ng-bind="record.company_name"></p>

				<input type="text" name="company_name" required class="form-control align-r"
					   ng-if="(record.editMode || 0) != 0"
					   ng-model="record.company_name" min="0"
					   placeholder="公司名称">
			</td>
			<td>
				<p ng-if="(record.editMode || 0) == 0">
					{{record.is_auth == 1 ? '是' : '否'}}
				</p>

				<div ng-if="(record.editMode || 0) != 0">
					<input name="is_auth" select2 ng-model="record.is_auth" select2-model="ddl2IsAuth"
						   config="ddlConfigIsAuth" class="form-control" placeholder="是否已认证"/>
				</div>
			</td>
			<td>
				<p ng-if="(record.editMode || 0) == 0">
					{{record.is_gloden == 1 ? '是' : '否'}}
				</p>

				<div ng-if="(record.editMode || 0) != 0">
					<input name="is_gloden" select2 ng-model="record.is_gloden" select2-model="ddl2IsGloden"
						   config="ddlConfigIsGloden" class="form-control" placeholder="是否金牌"/>
				</div>
			</td>
			<td>
				<p ng-if="(record.editMode || 0) == 0" ng-bind="record.payamount"></p>

				<input type="number" name="payamount" required class="form-control align-r"
					   ng-if="(record.editMode || 0) != 0"
					   ng-model="record.payamount" min="0"
					   placeholder="支付金额">
			</td>
			<td>
				<p ng-if="(record.editMode || 0) == 0" ng-bind="record.deduction"></p>

				<input type="number" name="deduction" required class="form-control align-r"
					   ng-if="(record.editMode || 0) != 0"
					   ng-model="record.deduction" min="0"
					   placeholder="扣减权益">
			</td>
			<td>
				<p ng-if="(record.editMode || 0) == 0" ng-bind="record.deduction_orderid"></p>

				<input type="text" name="deduction_orderid" required class="form-control align-r"
					   ng-if="(record.editMode || 0) != 0"
					   ng-model="record.deduction_orderid" min="0"
					   placeholder="权益id">
			</td>
			<td>
				<p ng-if="(record.editMode || 0) == 0" ng-bind="record.payway"></p>

				<input type="text" name="payway" required class="form-control align-r"
					   ng-if="(record.editMode || 0) != 0"
					   ng-model="record.payway" min="0"
					   placeholder="支付方式">
			</td>
			<td>
				<span ng-if="(record.editMode || 0) == 0" ng-bind="record.sign_up_time | strdate:'yyyy-MM-dd'"/>

				<input type="text" name="sign_up_time" required class="form-control input-date"
					   ng-if="(record.editMode || 0) != 0"
					   ng-model="record.sign_up_time" ui-date
					   format="yyyy-MM-dd" required
					   style="width: 100%" placeholder="签约时间">
			</td>
			<td>
				<p ng-if="(record.editMode || 0) == 0" ng-bind="record.invoice_code"></p>

				<input type="text" name="invoice_code" required class="form-control align-r"
					   ng-if="(record.editMode || 0) != 0"
					   ng-model="record.invoice_code" min="0"
					   placeholder="发票编码">
			</td>
			<td class="lh14">
				<a ng-if="(record.editMode || 0)  == 0" href="javascript:void(0)"
				   title="修改信息"
				   ng-click="editPayinfo(record, $index)">修改</a>

				<a ng-if="(record.editMode || 0)  != 0" href="javascript:void(0)"
				   title="保存信息"
				   ng-click="savePayinfo(record)">确定</a>
				<a ng-if="(record.editMode || 0)  != 0" href="javascript:void(0)"
				   title="取消"
				   ng-click="cancelPayinfo(record, $index)">取消</a>
			</td>
		</tr>
		</tbody>
	</table>
	<div class="no-data" ng-if="funds.length == 0" style="height:180px"><span>暂无数据</span></div>

</div>
